﻿<%@ Page Language="C#" AutoEventWireup="true"  EnableViewState="false" EnableEventValidation="false" CodeBehind="PurchasePlanRptList.aspx.cs" Inherits="WMS6.Web.Analytics.PurchasePlanRptList" %>
<%@ PreviousPageType VirtualPath="~/Analytics/PurchasePlanRptQuery.aspx" %>
<%@ Register src="../UserControls/Pager.ascx" tagname="Pager" tagprefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>StockRptList</title>
    <link href="../style/zh/1/css.css" type="text/css" rel="Stylesheet" id="mycss" />
    <link href="../Css/style.css" type="text/css" rel="stylesheet" />
    <script src="../Js/jquery.js" type="text/javascript"></script>
    <script src="../Js/jquery.simplemodal.js" type="text/javascript"></script> 
    <script src="../Js/util.js" type="text/javascript"></script>
    <script src="../Js/InitPage.js" type="text/javascript"></script>    
    <script src="../Js/checkbox.js" type="text/javascript"></script>    
    <script type="text/javascript">
    
      window.onload = function(){
            initListPage();
        }
        
        function returnSearch()
        {
            var from = document.getElementById("hdnFrom").value;
            if(from != "")
            {
                window.location.href = "PurchasePlanRptQuery.aspx";
            }
            else
            {
                window.history.go(-1);
            }
        }
    </script>
</head>
<body>
    <form id="F15141" runat="server">
    <div>
        <asp:ScriptManager ID="ScriptManager1" runat="server" />
        
        
        <div id="div_List_top">
            <table>
                <tr>
                    <td valign="bottom"><asp:Label ID="lblReceiptInquiryList" runat="server" CssClass="label_header"  Text="采购计划" meta:resourcekey="lblUom"></asp:Label></td>
                      <td><asp:Button ID="btnRefresh" runat="server" CssClass="button" Enabled="False" 
                              Text="<%$Resources:ButtonResource,btnRefresh%>"  
                              onclick="btnRefresh_Click" /></td>
                    </tr>
            </table>
        </div>
        <div class="blank8">
        </div>
        
        
         <asp:UpdatePanel ID="up1" runat="server">
            <ContentTemplate>
                
                <div id="div_List">
                <div id="div_List_msg">
                        <asp:Label ID="lblMsg" runat="server" CssClass="label_message"></asp:Label>
                    </div>
                        <asp:GridView ID="gvPurchasePlanRpt" runat="server" AutoGenerateColumns="False" AllowSorting="True"
                        CssClass="gridview" DataKeyNames="SKU_ID" PageSize="20"  Width="1000px" 
                            onrowdatabound="gvPurchasePlanRpt_RowDataBound" onsorting="gvPurchasePlanRpt_Sorting"  oninit="gvPurchasePlanRpt_Init" 
                            meta:resourcekey="gvPurchasePlanRpt" >
                        <FooterStyle CssClass="GridViewFooterStyle" />
                        <RowStyle CssClass="GridViewRowStyle" />
                        <HeaderStyle CssClass="GridViewHeaderStyle" />
                        <AlternatingRowStyle CssClass="GridViewAlternatingRowStyle" />
                            <Columns>
                                <asp:BoundField HeaderText="序号" FooterText="序号" 
                                    meta:resourcekey="BoundField">
                                    <ItemStyle CssClass="GridViewRowWidth_40" />
                                </asp:BoundField>
                                
                                <asp:TemplateField meta:resourcekey="TemplateField">
                                <HeaderTemplate>
                                    <img src="../Images/gvSettingpic.gif" id="img01" class="gvSettingImg" onclick="gvUserSetting('F15141','gvPurchasePlanRpt');" onmouseover="showGVUserSettingAlt(this);" alt="customize list" />
                                    <asp:CheckBox ID="CheckBox1" runat="server" 
                                        onclick="selectAll(this,'gvPurchasePlanRpt');" meta:resourcekey="CheckBox1" /> 
                                </HeaderTemplate>
                                <ItemTemplate>
                                    <asp:CheckBox ID="chbSelect" runat="server"  
                                        meta:resourcekey="chbSelect" />
                                </ItemTemplate>
                                <FooterTemplate>
                                    <asp:CheckBox ID="CheckBox2" runat="server" 
                                        onclick="selectAll(this,'gvPurchasePlanRpt');" meta:resourcekey="CheckBox2" /> 
                                </FooterTemplate>
                                <HeaderStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50"/>
                                <ItemStyle HorizontalAlign="Center" CssClass="GridViewRowWidth_50"/>
                            </asp:TemplateField>
                            <asp:BoundField DataField="OWNER_ID" HeaderText="货主代码" FooterText="货主代码" 
                                    SortExpression="INV.OWNER_ID" meta:resourcekey="OWNER_ID">
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:BoundField>
                                <asp:BoundField DataField="SKU_ID" HeaderText="货品代码" FooterText="货品代码" 
                                    SortExpression="INV.SKU_ID" meta:resourcekey="SKU_ID">
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:BoundField>                           
                                <asp:TemplateField FooterText="货品描述" HeaderText="货品描述" SortExpression="DESCR" 
                                    meta:resourcekey="DESCR" >
                                    <ItemTemplate>
                                        <asp:Label ID="lblSkuDescr" runat="server" 
                                            Text='<%# Eval("DESCR").ToString() %>' meta:resourcekey="lblSkuDescr"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_200" />       
                                 </asp:TemplateField> 
                              <asp:BoundField DataField="PACK_ID" HeaderText="包装代码" FooterText="包装代码" SortExpression="INV.PACK_ID"
                              >
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>
                             <asp:BoundField DataField="UOM_DESCR" HeaderText="单位" FooterText="单位" SortExpression="UOM_DESCR"
                             >
                                <ItemStyle CssClass="GridViewRowWidth_100" />
                            </asp:BoundField>                               
                                <asp:BoundField DataField="SKU_CLASS_ID" HeaderText="货品分类" FooterText="货品分类" 
                                    SortExpression="INV.SKU_CLASS_ID" meta:resourcekey="SKU_CLASS_ID">
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:BoundField>                                
                                <asp:TemplateField FooterText="最小库存" HeaderText="最小库存" SortExpression="MIN_QTY" 
                                    meta:resourcekey="MIN_QTY">
                                    <ItemTemplate>
                                        <asp:Label ID="lblMinQty" runat="server" 
                                            Text='<%# GetPreferenceDigit(Eval("MIN_QTY").ToString()) %>' 
                                            meta:resourcekey="lblQty"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>                                
                               <asp:TemplateField FooterText="最大库存" HeaderText="最大库存"  Visible="false"
                                    SortExpression="MAX_QTY" meta:resourcekey="MAX_QTY">
                                    <ItemTemplate>
                                        <asp:Label ID="lblMAX_QTY" runat="server" 
                                            Text='<%# GetPreferenceDigit(Eval("MAX_QTY").ToString()) %>' 
                                            meta:resourcekey="MAX_QTY"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                  <asp:TemplateField FooterText="库存量" HeaderText="库存量" 
                                    SortExpression="INVQTY" meta:resourcekey="INVQTY">
                                    <ItemTemplate>
                                        <asp:Label ID="lblInvQty" runat="server" 
                                            Text='<%# GetPreferenceDigit(Eval("INVQTY").ToString()) %>' 
                                            meta:resourcekey="lblCanuseQty"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                  <asp:TemplateField FooterText="在途库存" HeaderText="在途库存" 
                                    SortExpression="TRANSIT_QTY" meta:resourcekey="TRANSIT_QTY">
                                    <ItemTemplate>
                                        <asp:Label ID="lblTransitQty" runat="server" 
                                            Text='<%# GetPreferenceDigit(Eval("TRANSIT_QTY").ToString()) %>' 
                                            meta:resourcekey="lblCanuseQty"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                  <asp:TemplateField FooterText="最小订货量" HeaderText="最小订货量" 
                                    SortExpression="REORDER_QTY" meta:resourcekey="REORDER_QTY">
                                    <ItemTemplate>
                                        <asp:Label ID="lblReorderPoint" runat="server" 
                                            Text='<%# GetPreferenceDigit(Eval("REORDER_QTY").ToString()) %>' 
                                            meta:resourcekey="lblReorderPoint"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                                 <asp:TemplateField FooterText="订货量" HeaderText="订货量" 
                                    SortExpression="ORDERED_QTY" meta:resourcekey="ORDERED_QTY">
                                    <ItemTemplate>
                                        <asp:Label ID="lblOrderedQty" runat="server" 
                                            Text='' 
                                            meta:resourcekey="lblCanuseQty"></asp:Label>
                                    </ItemTemplate>
                                    <ItemStyle CssClass="GridViewRowWidth_100" />
                                </asp:TemplateField>
                            </Columns>
                         </asp:GridView>
                         
                         <div>
                        <table width="100%" border="0" cellspacing="0" cellpadding="0">
                            <tr style="height: 10px">
                                <td>
                                </td>
                            </tr>
                            <tr>
                                <td class="Result_01">
                                    总计：
                                </td>
                                <td class="Result_02">
                                    <table>
                                        <tr>
                                            <td style="margin-right: 20px;">
                                                &nbsp; &nbsp;
                                            </td>
                                              <td>
                                                <asp:Label ID="lblInvQty" runat="server" Text="库存量:" class="label"></asp:Label>
                                                <asp:Label ID="lblInvQtyText" runat="server" Text="" class="label" Style="margin-right: 10px;"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="lblTransitQty" runat="server" Text="在途库存:" class="label"></asp:Label><asp:Label
                                                    ID="lblTransitQtyText" runat="server" Text="" class="label" Style="margin-right: 10px;"></asp:Label>
                                            </td>
                                            <td>
                                                <asp:Label ID="lblOrderedQty" runat="server" Text="订货量:" class="label"></asp:Label>
                                                <asp:Label ID="lblOrderedQtyText" runat="server" Text="" class="label" Style="margin-right: 10px;"></asp:Label>
                                            </td>                                           
                                        </tr>
                                    </table>
                                </td>
                                <td class="Result_03">
                                </td>
                            </tr>
                            <tr style="height: 20px">
                                <td>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div id="div_pager">
                        <uc1:Pager ID="PagerFooter" runat="server"  OnFirst="btnFirst_Click" OnPrevious="btnPrevious_Click" OnNext="btnNext_Click" OnLast="btnLast_Click" OnGoTo="GoTo_Click"/>
                    </div>
                    <input type="hidden" runat="server" id="hdnFrom" />
             </ContentTemplate>
         </asp:UpdatePanel>
         <input type="hidden" id="hdnActionID" runat="server" />
         
         <div id="div_List_bottom">
            <table>
                <tr>
                    <td>
                        <asp:Button ID="btnSearch" runat="server" Text="<%$Resources:ButtonResource,btnSearch%>" CssClass="button" Enabled="False" 
                            OnClientClick="javascript:window.location.href='PurchasePlanRptQuery.aspx';return false;" 
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnReSearch" runat="server" Text="<%$Resources:ButtonResource,btnReSearch%>" CssClass="button" Enabled="False" 
                            OnClientClick="javascript:returnSearch();return false;" 
                             />
                    </td>
                    <td>
                        <asp:Button ID="btnList" runat="server" Text="<%$Resources:ButtonResource,btnList%>" CssClass="button" Enabled="False" 
                           onclick="btnList_Click"   />
                    </td>
                    <td>
                        <asp:Button ID="btnExport" runat="server" Text="<%$Resources:ButtonResource,btnExport%>" CssClass="button" Enabled="False" 
                             onclick="btnExport_Click"     />
                    </td>
                </tr>
            </table>
        </div>      
        
    </div>
    </form>
</body>
</html>
